package org.apache.flink.runtime.allocatedeploy;

import static org.apache.flink.util.Preconditions.checkNotNull;

import java.util.concurrent.CompletableFuture;

import org.apache.flink.runtime.allocatedeploy.execution.ExecutionID;
import org.apache.flink.runtime.resourceconsumer.LogicalSlot;

/**
 * @类名: ExecutionSlotAssignment
 * @说明: 执行与资源slot
 *
 * @author   leehom
 * @Date	 2024年7月31日 下午3:18:25
 * 修改记录：
 *
 * @see 	 
 */
class ExecutionSlotAssignment {

    private final ExecutionID executionId;

    private final CompletableFuture<LogicalSlot> logicalSlotFuture;

    ExecutionSlotAssignment(
            ExecutionID executionId,
            CompletableFuture<LogicalSlot> logicalSlotFuture) {
        this.executionId = checkNotNull(executionId);
        this.logicalSlotFuture = checkNotNull(logicalSlotFuture);
    }

    ExecutionID getExecutionId() {
        return executionId;
    }

    CompletableFuture<LogicalSlot> getLogicalSlotFuture() {
        return logicalSlotFuture;
    }
}
